package com.xm.po;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
/**
* @Description: 订单详情实体类
* @Author: Mr.Wang
* @Date: 2020/8/6
*/
public class OrderGoods{
	//属性
	private Integer id;
	//订单id
	private Integer orderId;
	//商品id
	private Integer goodsId;
	//购买数量
	private Integer goodsNums;
	//商品价格
	private Double goodsPrice;
	//商品类型id
	private Integer goodsAttrId;
	//商品类型名称
	private String goodsAttrName;
	//商品名称
	private String goodsName;
	//商品略缩图
	private String goodsThums;
	//创建时间
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	//构造器
	public OrderGoods(){}
	public OrderGoods(Integer orderId){
		this.orderId = orderId;
	}

	public OrderGoods(Integer id, Integer orderId, Integer goodsId, Integer goodsNums, Double goodsPrice, Integer goodsAttrId, String goodsAttrName, String goodsName, String goodsThums, Date createTime) {
		this.id = id;
		this.orderId = orderId;
		this.goodsId = goodsId;
		this.goodsNums = goodsNums;
		this.goodsPrice = goodsPrice;
		this.goodsAttrId = goodsAttrId;
		this.goodsAttrName = goodsAttrName;
		this.goodsName = goodsName;
		this.goodsThums = goodsThums;
		this.createTime = createTime;
	}

	//getter setter方法
	public void setId(Integer id){
		this.id=id;
	}
	public Integer getId(){
		return id;
	}
	public void setOrderId(Integer orderId){
		this.orderId=orderId;
	}
	public Integer getOrderId(){
		return orderId;
	}
	public void setGoodsId(Integer goodsId){
		this.goodsId=goodsId;
	}
	public Integer getGoodsId(){
		return goodsId;
	}
	public void setGoodsNums(Integer goodsNums){
		this.goodsNums=goodsNums;
	}
	public Integer getGoodsNums(){
		return goodsNums;
	}
	public void setGoodsPrice(Double goodsPrice){
		this.goodsPrice=goodsPrice;
	}
	public Double getGoodsPrice(){
		return goodsPrice;
	}
	public void setGoodsAttrId(Integer goodsAttrId){
		this.goodsAttrId=goodsAttrId;
	}
	public Integer getGoodsAttrId(){
		return goodsAttrId;
	}
	public void setGoodsAttrName(String goodsAttrName){
		this.goodsAttrName=goodsAttrName;
	}
	public String getGoodsAttrName(){
		return goodsAttrName;
	}
	public void setGoodsName(String goodsName){
		this.goodsName=goodsName;
	}
	public String getGoodsName(){
		return goodsName;
	}
	public void setGoodsThums(String goodsThums){
		this.goodsThums=goodsThums;
	}
	public String getGoodsThums(){
		return goodsThums;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String toString(){
		return "Ordergoods [id=" + id + ", orderId=" + orderId + ", goodsId=" + goodsId + ", goodsNums=" + goodsNums + ", goodsPrice=" + goodsPrice + ", goodsAttrId=" + goodsAttrId + ", goodsAttrName=" + goodsAttrName + ", goodsName=" + goodsName + ", goodsThums=" + goodsThums + "]";
	}
}

